package jiubeirobot.com.robotshop.common.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;

/**
 * ==========================
 * 创建人：TheJoker丶豪 on
 * 创建时间：2017/9/4.
 * 创建内容：解决垂直滚动冲突
 * ==========================
 */

public class MyScrollView extends ScrollView {
    AddressSelectedView llytAddress;

    public void setLlytAddress(AddressSelectedView llytAddress) {
        this.llytAddress = llytAddress;
    }

    public MyScrollView(Context context) {
        super(context);
    }

    public MyScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyScrollView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        boolean e = super.onInterceptTouchEvent(ev);
        if (ev.getY() > 240 && ev.getY() < 410) {
            return false;
        }
        return e;
    }
}
